-- GENERATED SPELL FOR [Thrallmar Grunt] --


function spell0_16580(pUnit, Event) --@Dismounting Blast,n/a--
pUnit:FullCastSpellOnTarget(18396,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16580', 252, 1)
end

function spell1_16580(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(19643,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16580', 5346, 1)
end

function spell2_16580(pUnit, Event) --@Snap Kick,n/a--
pUnit:FullCastSpellOnTarget(15618,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16580', 2326, 1)
end

function Sorts_16580(pUnit, Event)
local choix_sorts_16580 = math.random(0, 2)
if choix_sorts_16580 == 0 then
pUnit:RegisterEvent('spell0_16580', 1, 1)
end
if choix_sorts_16580 == 1 then
pUnit:RegisterEvent('spell1_16580', 1, 1)
end
if choix_sorts_16580 == 2 then
pUnit:RegisterEvent('spell2_16580', 1, 1)
end
end

function mob16580_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16580', math.random(1500, 3000), 1)
end

function mob16580_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16580_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16580_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16580, 1, 'mob16580_Action')
RegisterUnitEvent(16580, 2, 'mob16580_Leave')
RegisterUnitEvent(16580, 3, 'mob16580_Kill')
RegisterUnitEvent(16580, 4, 'mob16580_Die')
